package com.trade.module.base.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Class Description: 资源实体类
 *
 * @Version v1.0 2017/4/21 20:24
 * @JDK version 1.8.0_51
 * @Author zfb
 */
@Entity
@Table(name = "base_resource")
public class Resource extends BaseEntity implements Serializable{

    private static final long serialVersionUID = 158492709310658487L;

    /**
     * Field description：上级资源ID
     */
    @Column(
            name = "res_parent_resource_id",
            length = 64

    )
    private String resParentResourceId;

    /**
     * Field description：资源名称
     */
    @Column(
            name = "res_name",
            nullable = false,
            length = 64
    )
    private String resName;

    /**
     * Field description：资源类型
     */
    @Column(
            name = "res_type",
            nullable = false,
            length = 20
    )
    private String resType;

    /**
     * Field description：资源链接
     */
    @Column(
            name = "res_url",
            length = 128
    )
    private String resUrl;

    /**
     * Field description：菜单图标
     */
    @Column(
            name = "res_icon",
            length = 32
    )
    private String resIcon;

    /**
     * Field description：资源编码
     */
    @Column(
            name = "res_element_code",
            nullable = false,
            length = 64
    )
    private String resElementCode;

    /**
     *Field description：是否显示
     */
    @Column(
            name = "res_isShow",
            nullable = false,
            length = 2,
            columnDefinition = "varchar(2) default '1'"
    )
    private String isShow;

    /**
     * Field description：资源状态
     */
    @Column(
            name = "res_flag",
            nullable = false,
            length = 20
    )
    private String resFlag;

    /**
     * Field description：资源级别
     */
    @Column(
            name = "res_level",
            nullable = false,
            length = 20
    )
    private String resLevel;

    /**
     * Field description：资源顺序
     */
    @Column(
            name = "res_rank"
    )
    private Integer resRank;


    public String getResParentResourceId() {
        return resParentResourceId;
    }

    public void setResParentResourceId(String resParentResourceId) {
        this.resParentResourceId = resParentResourceId;
    }

    public String getResName() {
        return resName;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResType() {
        return resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    public String getResUrl() {
        return resUrl;
    }

    public void setResUrl(String resUrl) {
        this.resUrl = resUrl;
    }

    public String getResElementCode() {
        return resElementCode;
    }

    public void setResElementCode(String resElementCode) {
        this.resElementCode = resElementCode;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    public String getResFlag() {
        return resFlag;
    }

    public void setResFlag(String resFlag) {
        this.resFlag = resFlag;
    }

    public String getResLevel() {
        return resLevel;
    }

    public void setResLevel(String resLevel) {
        this.resLevel = resLevel;
    }

    public Integer getResRank() {
        return resRank;
    }

    public void setResRank(Integer resRank) {
        this.resRank = resRank;
    }

    public String getResIcon() {
        return resIcon;
    }

    public void setResIcon(String resIcon) {
        this.resIcon = resIcon;
    }
}
